import { reqCategoryList} from "../api/index";

const actions = {
    sendArticle({commit},articleInfo){
        commit('SENDARTICLE',articleInfo)
    }
    // async categoryList({commit}){
    //     let result = await reqCategoryList();
    //     if(result.code==200){
    //         commit("CATEGORYLIST",result.data)
    //         console.log(result)
    //     }
    // },
}
const mutations = {
    // CATEGORYLIST(state,categoryList){
    //     state.categoryList = categoryList
    // },
    SENDARTICLE(state,articleInfo){
        state.articleInfo = articleInfo
    }
}
const state = {
    // categoryList:[],
    articleInfo:{}
}
const getters = {}

export default{
    actions,
    mutations,
    state,
    getters
}